//
//  QrCodeViewController.m
//  AnnCar_user
//
//  Created by LiBenCan on 17/10/27.
//  Copyright © 2017年 LiBenCan. All rights reserved.
//

#import "QrCodeViewController.h"
#import "SYQRCodeViewController.h"
#import "SYQRCodeUtility.h"

static NSString *const text = @"https://github.com/reesun1130";
@interface QrCodeViewController ()

@end

@implementation QrCodeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"二维码扫描";
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    
    [self addSaoMiao];
}



#pragma mark - 扫描、读取、生成二维码


-(void)addSaoMiao{
    __weak QrCodeViewController *weakSelf = self;
    
    SYQRCodeViewController *qrcodevc = [[SYQRCodeViewController alloc] init];
    qrcodevc.SYQRCodeSuncessBlock = ^(SYQRCodeViewController *aqrvc,NSString *qrString) {
        [weakSelf.navigationController popViewControllerAnimated:YES];
    };
    qrcodevc.SYQRCodeFailBlock = ^(SYQRCodeViewController *aqrvc) {
        [weakSelf.navigationController popViewControllerAnimated:YES];
    };
    qrcodevc.SYQRCodeCancleBlock = ^(SYQRCodeViewController *aqrvc) {
        [weakSelf.navigationController popViewControllerAnimated:YES];
    };
    [self.navigationController pushViewController:qrcodevc animated:YES];
}


@end
